#include"mywind.h"

mywind::mywind(QWidget *parent):QWidget(parent)
{
    this->setWindowFlags(Qt::Window);
    this->setWindowTitle(QObject::tr("console"));
    this->setGeometry(0,0,400,60);
    this->setWindowIcon(QIcon(":/new/pictures/zautowatch.jpg"));

    QDesktopWidget *desk=QApplication::desktop();
    QRect screen=desk->screenGeometry();
    QString str=QString("Desktop:")+QString::number(screen.width())+"x"+QString::number(screen.height());
    l1.setParent(this);
    l1.move(0,0);
    l1.setText(str);
    btn1.setParent(this);
    btn1.setText("testrect");
    btn2.setParent(this);
    btn2.setText("showrects");
    btn1.move(0,30);
    btn2.move(101,30);

    ml=new mylabel();
    ml->sr=nullptr;
    sr=new setrect();
    connect(&btn1,SIGNAL(clicked()),this,SLOT(on_btn1_clicked()));
    connect(&btn2,SIGNAL(clicked()),this,SLOT(on_btn2_clicked()));
}
mywind::~mywind()
{
    delete ml;
    delete sr;
}

void mywind::on_btn1_clicked()
{
    ml->showFullScreen();
}

void mywind::on_btn2_clicked()
{
    sr->show();
}

void mywind::on_btn3_clicked()
{
		
}

